feat: add weekly/session usage limit pill in sidebar#880
feat: add weekly/session usage limit pill in sidebar#880adityavardhansharma wants to merge 4 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
|
so cool |
|
This is so helpful! |
|
closing because it generates foro / fud and you can view it at any time in the codex usage page or using a codex monitor |
What Changed
Added a "Weekly Usage" pill to the sidebar footer (above Settings) that shows Codex rate limits with the OpenAI logo. The pill adapts based on the user's plan:
Server:
codexAppServerManager.ts— addedfetchAndEmitRateLimits()that callsaccount/rateLimits/readon session start and after each completed turnCodexAdapter.ts— fixed payload wrapping so the rate limits object passes through correctlywsServer.ts— subscribed toaccount.rate-limits.updatedevents and broadcasts them to clientspackages/contracts/src/ws.ts— addedproviderRateLimitsUpdatedchannelWeb:
wsNativeApi.ts— addedRateLimitWindowandRateLimitsPayloadtypes,onRateLimitsUpdatedlistener, payload guard against null/non-object datarateLimitsStore.ts— new store usinguseSyncExternalStoreto expose rate limits to ReactWeeklyLimitPill.tsx— new component with OpenAI logo, progress bar, percentage left, reset time on hover, and expandable session/weekly view for Pro+ usersSidebar.tsx— renders the pill in the footer with a separator above SettingsWhy
Codex CLI shows weekly usage limits but the T3 Code GUI had no way to see them. This surfaces the same data from the Codex app-server without requiring users to check the CLI separately. The pill self-hides when no rate limit data is available, so it won't affect future providers like Claude Code or Open Code.
UI Changes
Before
After — Free / Go Plans
After — Pro Plan and above (collapsed)
After — Pro and above (expanded)
VIdeo:
Recording.2026-03-09.130236.mp4
Checklist
Note
Add weekly/session usage limit pill to sidebar
WeeklyLimitPillcomponent to the sidebar footer that displays the current rate limit status (session or weekly) with an expandable secondary window and a progress bar.rateLimitsStoreReact hook backed byuseSyncExternalStorethat subscribes to live rate limit updates pushed over WebSocket.account/rateLimits/updatednotifications on session start and after each turn completes, forwarding updates to clients on a newprovider.rateLimitsUpdatedWS channel.RateLimitWindowandRateLimitsPayloadTypeScript types and the corresponding WS channel contract in ws.ts.Macroscope summarized b5ecd58.